/**
 * @Author: sxh
 * @Date: 2020/12/4
 * @Last Modified by: sxh
 * @Last Modified time: 2020/12/4
 */
const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 售后服务路由
const routers = [
  {
    path: '/customerService',
    meta: {
      title: '客户服务',
      icon: 'el-icon-s-cooperation'
    },
    redirect: '/customerService',
    component: RouteView,
    children: [{
      path: '/customerService/secneExamine',
      meta: {
        title: '现场调查管理'
      },
      redirect: '/customerService/secneExamine',
      component: RouteView,
      children: [{
        path: '/customerService/secneExamine/sceneLssue',
        meta: {
          title: '现场调查要求下发',
          keepAlive: true
        },
        component: AsyncComponent('customerService/secneExamine/sceneLssue')
      },
        {
          path: '/customerService/secneExamine/sceneQuery',
          meta: {
            title: '现场调查要求查询',
            keepAlive: true
          },
          component: AsyncComponent('customerService/secneExamine/sceneQuery')
        },
        {
          path: '/customerService/secneExamine/carSceneMaintain',
          meta: {
            title: '车辆现场调查信息维护',
            keepAlive: true
          },
          component: AsyncComponent('customerService/secneExamine/carSceneMaintain')
        },
        {
          path: '/customerService/secneExamine/carSceneQuery',
          meta: {
            title: '车辆现场调查信息查询',
            keepAlive: true
          },
          component: AsyncComponent('customerService/secneExamine/carSceneQuery')
        }
      ]
    },
    {
        path: '/customerService/SecurityCode',
        meta: {
          title: '防盗码管理'
        },
        redirect: '/customerService/SecurityCode',
        component: RouteView,
        children: [
          {
            path: '/customerService/SecurityCode/obtainMode',
            meta: {
              title: '防盗码获取方式维护',
              keepAlive: true
            },
            component: AsyncComponent('customerService/SecurityCode/obtainMode')
          },
          {
            path: '/customerService/SecurityCode/securityCodeUpdate',
            meta: {
              title: '车辆防盗码维护',
              keepAlive: true
            },
            component: AsyncComponent('customerService/SecurityCode/securityCodeUpdate')
          },
          {
            path: '/customerService/SecurityCode/getSecurityCode',
            meta: {
              title: '车辆防盗码获取',
              keepAlive: true
            },
            component: AsyncComponent('customerService/SecurityCode/getSecurityCode')
          },
          {
            path: '/customerService/SecurityCode/getSccessRecord',
            meta: {
              title: '车辆防盗码获取记录查询',
              keepAlive: true
            },
            component: AsyncComponent('customerService/SecurityCode/getSccessRecord')
          }
        ]
    },
    {
      path: '/customerService/complaint',
      meta: {
        title: '投诉管理'
      },
      redirect: '/customerService/complaint',
      component: RouteView,
      children: [{
        path: '/customerService/complaint/complaintbill',
        meta: {
          title: '投诉接待',
          keepAlive: true
        },
        component: AsyncComponent('customerService/complaint/complaintbill')
      },
      {
        path: '/customerService/complaint/findcomplaintforstore',
        meta: {
          title: '投诉查询',
          keepAlive: true
        },
        component: AsyncComponent('customerService/complaint/findcomplaintforstore')
      },
      {
        path: '/customerService/complaint/findcomplaintforfactory',
        meta: {
          title: '投诉单查询',
          keepAlive: true
        },
        component: AsyncComponent('customerService/complaint/findcomplaintforfactory')
      },
      {
        path: '/customerService/complaint/complaintdealwith',
        meta: {
          title: '投诉处理',
          keepAlive: true
        },
        component: AsyncComponent('customerService/complaint/complaintdealwith')
      },
      {
        path: '/customerService/complaint/complaintclosecase',
        meta: {
          title: '投诉结案',
          keepAlive: true
        },
        component: AsyncComponent('customerService/complaint/complaintclosecase')
      },
      {
        path: '/customerService/complaint/arbitration',
        meta: {
          title: '投诉仲裁处理',
          keepAlive: true
        },
        component: AsyncComponent('customerService/complaint/arbitration')
      }
      ]
    },
    {
      path: '/customerService/batteryfault',
      meta: {
        title: '电池故障预警'
      },
      redirect: '/customerService/batteryfault',
      component: RouteView,
      children: [
        {
          path: '/customerService/batteryfault/battery',
          meta: {
            title: '电池故障响应、处理时效维护',
            keepAlive: true
          },
          component: AsyncComponent('customerService/batteryfault/battery')
        },
        {
          path: '/customerService/batteryfault/batteryforstory',
          meta: {
            title: '电池故障信息查询(厂端)',
            keepAlive: true
          },
          component: AsyncComponent('customerService/batteryfault/batteryforstory')
        }
        ,
        {
          path: '/customerService/batteryfault/batteryfordealer',
          meta: {
            title: '电池故障信息查询(店端)',
            keepAlive: true
          },
          component: AsyncComponent('customerService/batteryfault/batteryfordealer')
        }
        ,
        {
          path: '/customerService/batteryfault/batterydealwith',
          meta: {
            title: '车辆电池故障处理',
            keepAlive: true
          },
          component: AsyncComponent('customerService/batteryfault/batterydealwith')
        }
      ]
    },
    {
      path:'/customerService/workHoursMaintenance',
      meta:{title:'工时维护',keepAlive:true},
      component:AsyncComponent('customerService/workHoursMaintenance/index')
    },
    ]
  }
];
export default routers;
